package com.example.enterprisemanager.mvvm.fragment.finding;


import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.enterprisemanager.BR;
import com.example.enterprisemanager.R;
import com.example.enterprisemanager.base.BaseMainFragment;
import com.example.enterprisemanager.base.BaseViewModel;
import com.example.enterprisemanager.databinding.FragmentFindingBinding;

/**
 * A simple {@link Fragment} subclass.
 */
public class FindingFragment extends BaseMainFragment<FragmentFindingBinding, FindingViewModel> {


    public static FindingFragment newInstance() {
        return new FindingFragment();
    }


    @Override
    protected int getLayoutId() {
        return R.layout.fragment_finding;
    }

    @Override
    protected Class<FindingViewModel> getModelClass() {
        return FindingViewModel.class;
    }

    @Override
    protected int getVariableId() {
        return BR.viewModel;
    }

    @Override
    protected void initView() {
        super.initView();
        mBinding.toolbar.setTitle(R.string.finding);
        initToolbarNav(mBinding.toolbar, true);

        mBinding.rbtnCate.setChecked(true);

        mBinding.rvGoods.setLayoutManager(new LinearLayoutManager(_mActivity));
        mBinding.rvGoods.setAdapter(mViewModel.adapter);
    }

    @Override
    protected void initData(@Nullable Bundle savedInstanceState) {

    }

}
